package cn.lg.soar.boot.config;

import cn.lg.soar.common.data.dict.IDict;
import cn.lg.soar.core.api.IResourceApi;
import cn.lg.soar.core.dto.SysDict;
import cn.lg.soar.mvc.controller.ResourceApiController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2023/10/1 15:44
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Component
public class ResourceApiImpl implements IResourceApi {

    @Lazy
    @Autowired
    private ResourceApiController local;

    @Override
    public Map<String, String> getAllPath() {
        return local.getAllPath();
    }

    @Override
    public IDict<Integer>[] getSysDict(String code) {
        return local.getSysDict(code);
    }

    @Override
    public List<SysDict<Integer>> getAllSysDict() {
        return local.getAllSysDict();
    }

    @Override
    public Map<String, IDict<?>[]> getEnums(String...names) {
        return local.getEnums(names);
    }
}
